﻿package component.fileupload.service;

import java.io.InputStream;
import java.util.Map;

import component.fileupload.exception.FileUploadException;
import component.fileupload.vo.UploadFileVO;

/**
 * 文件上传的接口
 */
public interface IFileUploadService {
	/**
	 * 保存单个文件
	 * 
	 * @param realPath
	 * @param relativePath
	 * @param fileName
	 * @param in
	 * @return
	 * @throws FileUploadException
	 */
	public String saveFile(String realPath, String relativePath,
			String fileName, InputStream in) throws FileUploadException;

	/**
	 * 保存单个文件
	 * 
	 * @param realPath
	 * @param relativePath
	 * @param vo
	 * @throws FileUploadException
	 */
	public void saveFile(String realPath, String relativePath, UploadFileVO vo)
			throws FileUploadException;

	/**
	 * 保存多个文件
	 * 
	 * @param realPath
	 * @param relativePath
	 * @param fileInfoMap
	 * @throws FileUploadException
	 */
	public void saveFiles(String realPath, String relativePath, Map fileInfoMap)
			throws FileUploadException;
}
